/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sample;
import org.neuroph.core.*;

/**
 * Classe usada para treinar e testar a rede neural
 * @author Leticia
 * @author Vanessa
 * Mel
 */
public class TestaRedeNeural {
    NeuralNetwork neuralN;
    /**
     * Cria um teste de rede neural
     */
    public TestaRedeNeural() {
        neuralN = NeuralNetwork.load("MLP.nnet");
    }

     /**
     * Testa a rede neural na etapa de treinamento
     */
    public void testarRedeNeuralTreinamento(int[] posicoes){
    	neuralN.setInput(new double[]{posicoes[0],posicoes[1],posicoes[2],posicoes[3], posicoes[4]});
    	neuralN.calculate();
    	double[] valorSaidaTeste = neuralN.getOutput();
    	System.out.println("Saida:" + valorSaidaTeste);
    	
    	for(double saidaTeste : valorSaidaTeste)
    	    System.out.println(Math.round(saidaTeste));
    }
}